<%@ page contentType="text/html; charset=gbk" %>
<%@page import="java.sql.*"%>
<%@page import="com.oa.database.*"%>
<%@page import="com.oa.util.*"%>
<%@page import="com.oa.util.control.*"%>
<%@page import="com.oa.project.*"%>
<%@page import="java.util.*"%>
<%@include file="/share/login_info.jsp" %>
<%
  ProjectProcess pro = new ProjectProcess();
  ProjectContactMoneyInfo moneyInfo = new  ProjectContactMoneyInfo();
	Contact contact = new Contact();
  String xmbh = "";
  String xmmc = "";
  String zbbm = "";
  String ctdw = "";
  String hth = "";
  String lxdh = "";
  String hzge = "";


    int id = Integer.parseInt(request.getParameter("ID"));
    moneyInfo = pro.findProjectContactMoneyInfoById(id);
    ProjectInfo proInfo = pro.findProjectInfoByXmid(moneyInfo.getXmid());
		contact = pro.findContactByHdid(moneyInfo.getHdid());
		hth = contact.getHdh();
		hzge = contact.getJo();
    xmbh = proInfo.getXmbh();
    xmmc = proInfo.getXmmc();
    ctdw = proInfo.getWtdw();
		lxdh = proInfo.getLxrdh();
    User user = pro.findFzrUserByXmid(moneyInfo.getXmid());
    if (user != null ) {
      zbbm = user.getDepName();
    }
		String YFK = moneyInfo.getYfk();
		String GSJE = moneyInfo.getHdjsjo();
		String GSJEDX = moneyInfo.getHdjsjodx();
		String SQJE = moneyInfo.getBzxqjo();
		String SQJEDX = moneyInfo.getBzxqjodx();

    ArrayList arrayList = pro.findProjectFlowInfoByXXidAndTablename(id,
        ProjectHelper.PRJ_HDFK, "OA_xmhdfkb");
    ProjectFlowInfo[] flowInfo = new ProjectFlowInfo[arrayList.size()];
    arrayList.toArray(flowInfo);

		String lrxm = "";
		String lrsj = "";
    String yj1 = "";
		String yj1xm = "";
		String yj1sj = "";
    String yj2 = "";
		String yj2xm = "";
		String yj2sj = "";
    String yj3 = "";
		String yj3xm = "";
		String yj3sj = "";

    switch(flowInfo.length) {
			case 0:
				break;
			case 1:
				lrxm = flowInfo[0].getSpryn();
				lrsj = flowInfo[0].getSpsjStr();
        break;
			case 2:
				lrxm = flowInfo[0].getSpryn();
				lrsj = flowInfo[0].getSpsjStr();
        yj1 = flowInfo[1].getYj();
				yj1xm = flowInfo[1].getSpryn();
				yj1sj = flowInfo[1].getSpsjStr();
        break;
      case 3:
				lrxm = flowInfo[0].getSpryn();
				lrsj = flowInfo[0].getSpsjStr();
        yj1 = flowInfo[1].getYj();
				yj1xm = flowInfo[1].getSpryn();
				yj1sj = flowInfo[1].getSpsjStr();
        yj2 = flowInfo[2].getYj();
				yj2xm = flowInfo[2].getSpryn();
				yj2sj = flowInfo[2].getSpsjStr();
        break;
      case 4:
				lrxm = flowInfo[0].getSpryn();
				lrsj = flowInfo[0].getSpsjStr();
        yj1 = flowInfo[1].getYj();
				yj1xm = flowInfo[1].getSpryn();
				yj1sj = flowInfo[1].getSpsjStr();
        yj2 = flowInfo[2].getYj();
				yj2xm = flowInfo[2].getSpryn();
				yj2sj = flowInfo[2].getSpsjStr();
        yj3 = flowInfo[3].getYj();
				yj3xm = flowInfo[3].getSpryn();
				yj3sj = flowInfo[3].getSpsjStr();
        break;
      default:
				lrxm = flowInfo[0].getSpryn();
				lrsj = flowInfo[0].getSpsjStr();
        yj1 = flowInfo[1].getYj();
				yj1xm = flowInfo[1].getSpryn();
				yj1sj = flowInfo[1].getSpsjStr();
        yj2 = flowInfo[2].getYj();
				yj2xm = flowInfo[2].getSpryn();
				yj2sj = flowInfo[2].getSpsjStr();
        yj3 = flowInfo[3].getYj();
				yj3xm = flowInfo[3].getSpryn();
				yj3sj = flowInfo[3].getSpsjStr();
        break;
     }
  String str = null;

  //??EtCell???XML???????
  str = "<EtCell>" + "\n";
  str = str + "<ID>xmzl.et</ID>" + "\n";
  str = str + "<?xml version='1.0'?> " + "\n";
  str = str + "<version>2.5</version> " + "\n";
  str = str + "<ALIASDATA>" + "\n";

	str =str +  "<XMBH>"+xmbh+"</XMBH>"+"\n";
	str =str +  "<XMMC>"+xmmc+"</XMMC>"+"\n";
  str =str +  "<ZBBM>"+zbbm+"</ZBBM>"+"\n";
  str =str +  "<HTH>"+hth+"</HTH>"+"\n";
  str =str +  "<LXDH>"+lxdh+"</LXDH>"+"\n";
  str =str +  "<CJDW>"+ctdw+"</CJDW>"+"\n";
  str =str +  "<HZGE>"+hzge+"</HZGE>"+"\n";

  str =str +  "<YFK>"+YFK+"</YFK>"+"\n";
  str =str +  "<GSJE>"+GSJE+"</GSJE>"+"\n";
  str =str +  "<GSJEDX>"+GSJEDX+"</GSJEDX>"+"\n";
  str =str +  "<SQJE>"+SQJE+"</SQJE>"+"\n";
  str =str +  "<SQJEDX>"+SQJEDX+"</SQJEDX>"+"\n";

  str =str +  "<GBR>"+""+"</GBR>"+"\n";
  str =str +  "<GBRQM>"+lrxm+"</GBRQM>"+"\n";
  str =str +  "<GBRQMRQ>"+lrsj+"</GBRQMRQ>"+"\n";
  str =str +  "<BZ>"+yj1+"</BZ>"+"\n";
  str =str +  "<BZQM>"+yj1xm+"</BZQM>"+"\n";
  str =str +  "<BZQMRQ>"+yj1sj+"</BZQMRQ>"+"\n";

  str =str +  "<ZXLD>"+yj2+"</ZXLD>"+"\n";
  str =str +  "<ZXLDQM>"+yj2xm+"</ZXLDQM>"+"\n";
  str =str +  "<ZXLDRQ>"+yj2sj+"</ZXLDRQ>"+"\n";
  str =str +  "<RKQK>"+yj3+"</RKQK>"+"\n";
  str =str +  "<RKQKQM>"+yj3xm+"</RKQKQM>"+"\n";
  str =str +  "<RKQKQMRQ>"+yj3sj+"</RKQKQMRQ>"+"\n";
  str =str +  "<BZ>"+""+"</BZ>"+"\n";

  str = str + "</ALIASDATA>" + "\n";

	str = str + "</EtCell>"  + "\n";
  out.print(str);
%>

